import { createRouter, createWebHistory } from 'vue-router'

import Person from "@/views/user/Person.vue"
import login from "@/views/login/login.vue"


const router = createRouter({
    history:createWebHistory(),
    routes:[
        {
            path:"/",
            name:"name",
            component:login
        },
        {
            path:"/userInfo",
            name:"userInfo",
            component:Person
        }
    ]
})


//全局守卫
router.beforeEach((to, from, next) => {
  next();  
})
  

export default router 
